Update sensitivity of the "Select all" button.
authorMatthias Clasen <mclasen@redhat.com>
Thu, 9 Sep 2004 12:46:25 +0000 (12:46 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Thu, 9 Sep 2004 12:46:25 +0000 (12:46 +0000)
2004-09-09  Matthias Clasen  <mclasen@redhat.com>

* tests/testfilechooser.c (main): Update sensitivity of the "Select all"
button.

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-6
ChangeLog.pre-2-8
tests/testfilechooser.c

index 0ddc343b4d2222ea48e1a6aae53567097e5737fc..388f5d74429c0f4250a6d6d2a362b5c863042c9e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2004-09-09  Matthias Clasen  <mclasen@redhat.com>
+
+       * tests/testfilechooser.c (main): Update sensitivity of the "Select all"
+       button.
+
 Wed Sep  8 18:38:08 2004  Soeren Sandmann  <sandmann@redhat.com>
 
        Make dropping of expandable items look nicer.
index 0ddc343b4d2222ea48e1a6aae53567097e5737fc..388f5d74429c0f4250a6d6d2a362b5c863042c9e 100644 (file)
@@ -1,3 +1,8 @@
+2004-09-09  Matthias Clasen  <mclasen@redhat.com>
+
+       * tests/testfilechooser.c (main): Update sensitivity of the "Select all"
+       button.
+
 Wed Sep  8 18:38:08 2004  Soeren Sandmann  <sandmann@redhat.com>
 
        Make dropping of expandable items look nicer.
index 0ddc343b4d2222ea48e1a6aae53567097e5737fc..388f5d74429c0f4250a6d6d2a362b5c863042c9e 100644 (file)
@@ -1,3 +1,8 @@
+2004-09-09  Matthias Clasen  <mclasen@redhat.com>
+
+       * tests/testfilechooser.c (main): Update sensitivity of the "Select all"
+       button.
+
 Wed Sep  8 18:38:08 2004  Soeren Sandmann  <sandmann@redhat.com>
 
        Make dropping of expandable items look nicer.
index 0ddc343b4d2222ea48e1a6aae53567097e5737fc..388f5d74429c0f4250a6d6d2a362b5c863042c9e 100644 (file)
@@ -1,3 +1,8 @@
+2004-09-09  Matthias Clasen  <mclasen@redhat.com>
+
+       * tests/testfilechooser.c (main): Update sensitivity of the "Select all"
+       button.
+
 Wed Sep  8 18:38:08 2004  Soeren Sandmann  <sandmann@redhat.com>
 
        Make dropping of expandable items look nicer.
index b792db9cd1f30dc2c3b90f43a52f9a3c3f1b9cc8..edcb7a6b74a73d781a59e8dd6957b3a1d8fdff3c 100644 (file)
@@ -375,6 +375,18 @@ kill_dependent (GtkWindow *win, GtkObject *dep)
   g_object_unref (dep);
 }
 
+static void
+notify_multiple_cb (GtkWidget  *dialog,
+                   GParamSpec *pspec,
+                   GtkWidget  *button)
+{
+  gboolean multiple;
+
+  multiple = gtk_file_chooser_get_select_multiple (GTK_FILE_CHOOSER (dialog));
+  
+  gtk_widget_set_sensitive (button, multiple);
+}
+
 int
 main (int argc, char **argv)
 {
@@ -510,6 +522,8 @@ main (int argc, char **argv)
   gtk_container_add (GTK_CONTAINER (vbbox), button);
   g_signal_connect_swapped (button, "clicked",
                            G_CALLBACK (gtk_file_chooser_select_all), dialog);
+  g_signal_connect (dialog, "notify::multiple", 
+                   G_CALLBACK (notify_multiple_cb), button);
   
   button = gtk_button_new_with_mnemonic ("_Unselect all");
   gtk_container_add (GTK_CONTAINER (vbbox), button);